<?php get_instance()->view('common/header');?>
<body class="bag3">
<form action="" id="save-form" method="post">
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access" href="javascript:;">
            <div class="weui-cell__bd">
                <p class="f09">订单号</p>
            </div>
            <div class="f09 cor6"><?php echo $info['code']?></div>
        </a>
        <a class="weui-cell weui-cell_access" href="javascript:;">
            <div class="weui-cell__bd">
                <p class="f09">下单时间</p>
            </div>
            <div class="f09 cor6"><?php echo $info['addtime']?></div>
        </a>
        <div class="f12 waper bor_bt heng vCenter itemitem bag3">
            <div class="left f08 vCenter "><span class="f09"><img class="lefttitleimg mr5 di mbmin" src="<?php echo $this->staticUrl?>img/png/pic23.png" alt="">商品信息</span></div>
        </div>
        <div class="weui-panel__bd bor_bb pt5">
            <?php foreach ($product as $v):?>
            <div class="p3 mb5">
                <a href="javascript:void(0);" class="weui-media-box_appmsg ">
                    <div class="weui-media-box__bd">
                        <h4 class="weui-media-box__title lh10 textEll f08 mb5"><?php echo $v['name']?></h4>
                        <p class="f07 cor9"><?php echo $v['property']?></p>
                    </div>
                    <div class="">
                        <p class="f08"><?php echo $v['price']?></p>
                        <b class="f07 cor9 lh10">x<?php echo $v['quantity']?></b>
                    </div>
                </a>
            </div>
            <?php endforeach;?>

        </div>
        
    </div>
    <div class="weui-cells weui-cells_form mt7 mb20">
        <div class="weui-cell weui-cell_access" >
            <div class="weui-cell__bd">
                <span style="vertical-align: middle" class="f09">请选择售后原因</span>
            </div>
            <div class="weui-cell__ft f08">
                <span id="showPicker" dataType="1" class="dk" style="width: 100px;height: 1em;"></span>
            </div>
        </div>
        <div class="weui-cell weui-cell_access" id="showPicker">
            <div class="weui-cell__bd">
                <span style="vertical-align: middle" class="f09">退款金额</span>
            </div>
            <div class="f09 vCenter"><input class="weui-input tr pr10" name="amount" type="number" pattern="[0-9]*" placeholder="请输入退款金额">元</div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <textarea name="reason" class="weui-textarea f09" placeholder="请具体描述售后原因" rows="5"></textarea>
                <div class="weui-textarea-counter f09"><span>0</span>/300</div>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <div class="weui-uploader">
                    <div class="weui-uploader__bd">
                        <ul class="weui-uploader__files" id="uploaderFiles">

                        </ul>
                        <div class="weui-uploader__input-box jdjz">
                            <img src="<?php echo $this->staticUrl?>img/png/pic104.png">
                            <input id="uploaderInput" class="weui-uploader__input chooseImage" type="file" accept="image/*" multiple/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="pb20">
        <input type="hidden" name="order_id" value="<?php echo $info['id'];?>">
        <button class="kbtn">提交售后单</button>
    </div>
</form>
</body>

<script>
    var pub = <?php echo $reason?>;
    $('#showPicker').on('click', function () {
//        var pub = [{label: '飞机票',value: 0}, {label: '火车票',value: 1}]
        _this = $(this);
        weui.picker(pub, {
            onChange: function (result) {
                console.log(result);
            },
            onConfirm: function (result) {
//	                	console.log(result)
                letmol = result.toString();
                $.each(pub,function(key,val){
                    if(val.value == result){
                        _this.text(val.label);
                        if(typeof goPicker == 'function'){
                            goPicker(name,result);
                        }
                        return false;
                    }
                })
            }
        });
    });


</script>
<script type="text/javascript">
    $(function () {
        $.e_validate.init('#save-form',{saveMessage:'保存中...'});

        weUiImg({
            name:'images[]',
            imagesNumber:6,
            changeImagesNumber:6

        });
    })

</script>
<script src="<?php echo $this->staticUrl?>js/base.js"></script>
</html>
